import axios from "axios";
import {urlConfig} from "../Config";

const fetchStation = async () => {
  const msg = await axios.get(urlConfig.getUrlFor("/station", {start: 0, size: -1}));
  return msg.data.result;
};

const fetchStationById = async (id: any)=>{
  const msg = await axios.get(urlConfig.getUrlFor("/station/"+id));
  return msg.data;
}

export {fetchStation, fetchStationById};